home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE06 / CONSTRUC / FILEPROP.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-12-11  |  641 b   |  31 lines

  1. unit FileProp;
  2. interface
  3. uses DsgnIntf;
  4.  
  5. Type
  6.   TFileModeProperty = class(TIntegerProperty)
  7.   public
  8.     function GetAttributes: TPropertyAttributes; override;
  9.     procedure Edit; override;
  10.   end;
  11.  
  12. implementation
  13. uses SysUtils, Controls, FileMode;
  14.  
  15.   function TFileModeProperty.GetAttributes: TPropertyAttributes;
  16.   begin
  17.     Result := [paDialog]
  18.   end {GetAttributes};
  19.  
  20.   procedure TFileModeProperty.Edit;
  21.   begin
  22.     with TFileModeDlg.Create(nil) do
  23.     try
  24.       FileShareMode := GetOrdValue;
  25.       if ShowModal = mrOk then
  26.         SetOrdValue(FileShareMode)
  27.     finally
  28.       Free
  29.     end
  30.   end {Edit};
  31. end.